package com.qf.dao;

import com.qf.entity.Users;
import org.apache.catalina.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UsersDao {
   //@Select("select userid,username,birthday from users")
    public List<Users> getall();
  @Select("select userid,username,birthday from users where username like '%${n1}%'")
    public List<Users> getallpage(@Param("n1") String name);

  @Insert("insert into users(username,birthday) values(#{username},#{birthday})")
  @Options(useGeneratedKeys = true,keyProperty = "userid")
  public int insertUsers(Users users);
}
